package com.runtime.hongyunuser.mapper;

import com.runtime.hongyunuser.bean.Userfavorites;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

@Mapper
public interface UserFavoriteMapper {

    Userfavorites findByUserIdAndProductId(@Param("userId") Long userId, @Param("productId") Long productId);

    void save(Userfavorites userfavorites);

    Integer countByUserAndProduct(@Param("userId") Long userId, @Param("productId") Long productId);

    int deleteByUserAndProduct(@Param("userId") Long userId, @Param("productId") Long productId);

    int insert(Userfavorites entity);
}
